package com.bluesky.example.myaop.interceptors;

import java.lang.reflect.Method;
import java.util.Date;
import java.util.logging.Logger;

import com.bluesky.example.myaop.MethodInterceptor;

public class ParameterInterceptor implements MethodInterceptor {
	private Logger logger = Logger.getLogger(this.getClass().getName());

	private Date start;

	@Override
	public void Before(Object target, Method method, Object[] args) {

		StringBuilder sb = new StringBuilder();
		sb.append(method.getName()+"(");
		for(Object o : args)
			sb.append(o+",");
			
		sb.append(")");
		
		logger.info("ParameterInterceptor "+sb.toString());

	}

	@Override
	public void After(Object target, Method method, Object[] args) {

		
	}
}
